home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIClipboard.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  128 lines

  1. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is Mozilla Communicator.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corp.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Mike Pinkerton
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40.  
  41. #include "nsISupports.idl"
  42. #include "nsISupportsArray.idl"
  43. #include "nsITransferable.idl"
  44. #include "nsIClipboardOwner.idl"
  45.  
  46.  
  47. [scriptable, uuid(8B5314BA-DB01-11d2-96CE-0060B0FB9956)]
  48. interface nsIClipboard : nsISupports
  49. {
  50.     const long kSelectionClipboard = 0;
  51.     const long kGlobalClipboard = 1;
  52.     
  53.    /**
  54.     * Given a transferable, set the data on the native clipboard
  55.     *
  56.     * @param  aTransferable The transferable
  57.     * @param  anOwner The owner of the transferable
  58.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  59.     * @result NS_Ok if no errors
  60.     */
  61.   
  62.     void setData ( in nsITransferable aTransferable, in nsIClipboardOwner anOwner, 
  63.                     in long aWhichClipboard ) ;
  64.  
  65.    /**
  66.     * Given a transferable, get the clipboard data.
  67.     *
  68.     * @param  aTransferable The transferable
  69.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  70.     * @result NS_Ok if no errors
  71.     */
  72.   
  73.     void getData ( in nsITransferable aTransferable, in long aWhichClipboard ) ;
  74.  
  75.    /**
  76.     * This empties the clipboard and notifies the clipboard owner.
  77.     * This empties the "logical" clipboard. It does not clear the native clipboard.
  78.     *
  79.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  80.     * @result NS_OK if successful.
  81.     */
  82.   
  83.     void emptyClipboard ( in long aWhichClipboard ) ;
  84.  
  85.    /**
  86.     * This provides a way to give correct UI feedback about, for instance, a paste 
  87.     * should be allowed. It does _NOT_ actually retreive the data and should be a very
  88.     * inexpensive call. All it does is check if there is data on the clipboard matching
  89.     * any of the flavors in the given list.
  90.     *
  91.     * @aFlavorList - nsISupportsCString's in a nsISupportsArray (for JavaScript).
  92.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  93.     * @outResult - if data is present matching one of 
  94.     * @result NS_OK if successful.
  95.     */
  96.     boolean hasDataMatchingFlavors ( in nsISupportsArray aFlavorList, in long aWhichClipboard )  ;
  97.  
  98.    /**
  99.     * Allows clients to determine if the implementation supports the concept of a 
  100.     * separate clipboard for selection.
  101.     * 
  102.     * @outResult - true if 
  103.     * @result NS_OK if successful.
  104.     */
  105.     boolean supportsSelectionClipboard ( ) ;
  106. };
  107.  
  108. // Interface to a native image format such as the format stored on the clipboard
  109. [scriptable, uuid(DB21EB6C-AEBB-4d16-94EC-BCD8BBF513AE)]
  110. interface nsIClipboardImage : nsISupports
  111. {
  112.   // the idl compiler complains if these two methods are scriptable. need to figure out why
  113.   [noscript] void setNativeImage(in voidPtr aNativeImageData);
  114.  
  115.   // caller must later call releaseNativeImage to release their reference to the image. nsIClipboardImage
  116.   // will keep its own reference until it is destroyed.
  117.   [noscript] void getNativeImage(in voidPtr aNativeImageData); 
  118.  
  119.   // releaseNativeImage should only be called if you used getNativeImageData. You should pass in the same
  120.   // object to both methods. (this routine exists so callers do not have to link in urlmon.lib just to release
  121.   // the stgmedium object on windows).
  122.   [noscript] void releaseNativeImage(in voidPtr aNativeImageData);
  123. };
  124.  
  125. %{ C++
  126.  
  127. %}
  128.